﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeBehind="EmployeeManage.aspx.cs" Inherits="DBA.Web.SystemManage.EmployeeManage.EmployeeManage" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" />

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title></title>
<link href="../../Styles/azure/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="../../Styles/css/core.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="../../Scripts/lhgdialog/skins/default.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->
    <script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>   
<script src="../../Scripts/jquery.bgiframe.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.core.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.ui.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.sortDrag.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.cssTable.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.stable.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.pagination.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.drag.js" type="text/javascript"></script>
<script src="../../Scripts/dwz.barDrag.js" type="text/javascript"></script>
<script src="../../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script src="../../Scripts/Public.js" type="text/javascript"></script>
    <script src="/Scripts/date/WdatePicker.js" type="text/javascript"></script>
<!--
<script src="bin/dwz.min.js" type="text/javascript"></script>
-->

    <script type="text/javascript">
        var winAdd;
        function turnModifyPage(id, title, page) {
            Public.ShowWindow(title, "/SystemManage/EmployeeManage/" + page + "?id=" + id + "&o=" + Math.random(), 700, 550);
        }

        function manageStudy(id, title, page) {
            winAdd = Public.ShowWindow(title, "/SystemManage/EmployeeManage/" + page + "?id=" + id + "&o=" + Math.random(), 900, 550);
        }

        function manageWork(id, title, page) {
            winAdd = Public.ShowWindow(title, "/SystemManage/EmployeeManage/" + page + "?id=" + id + "&o=" + Math.random(), 900, 550);
        }

        function searchHandler() {
            __doPostBack("linkBtnSearch", "");
        }
        function initTable(_box) {
            var $p = $(_box || document);
            //tables
            $("table.table", $p).jTable();
            // css tables
            $('table.list', $p).cssTable();
        }

        function RefreshChildWin() {
            winAdd.dgWin.RefreshGrid();
        }

        function ddd() {
            $("#dialog-form").dialog("open");
        }
        function addDate() {
            Public.ShowWindow('添加教师信息', "/SystemManage/EmployeeManage/EmployeeAdd.aspx", 700, 550);
        }
    </script>
    <script type="text/javascript">
        $(function () {
            //初始化
            DWZ.init("../../dwz.frag.xml");
            initTable();
            //updatepanel回调完成后初始化表格
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
                initTable();
            });

        });
        //批量删除事件
        function deleteSelect() {
            var selectValue = $("#tableBody").getAllSelectedValue().join(",");
            if (selectValue != undefined && selectValue != '') {
                parent.alertMsg.confirm("是否删除选择的信息?", {
                    okCall: function () {
                        $("#hidDeleString").val(selectValue);
                        __doPostBack("linkBtnDeleSelect", "");
                    }
                });
            } else {
                parent.alertMsg.info("请选择要删除要的数据");
            }
        }
        function DownLoadExcel() {
            Public.CallBack("lnkDownload");
        }
	</script>
</head>
<body style="background-color:#fff;">
    <form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>    
    <div class="pageHeader">
      <div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					姓名：<asp:TextBox ID="txtName" runat="server" style="width:100px;" CssClass="textInput"></asp:TextBox>
				</td>
                <td>
					性别：<asp:DropDownList ID="ddlSex" runat="server" 
                        Height="20px" Width="142px">
                        <asp:ListItem Value="-1">——请选择——</asp:ListItem>
                        <asp:ListItem Value="1">男</asp:ListItem>
                        <asp:ListItem Value="0">女</asp:ListItem>
                    </asp:DropDownList>
				</td>
                <td>
					系：<asp:DropDownList ID="ddlXi" runat="server" Height="20px" 
                        Width="142px">
                    </asp:DropDownList>
				</td>
                <td>
					所：<asp:DropDownList ID="ddlSuo" runat="server" Height="20px" 
                        Width="230px">
                    </asp:DropDownList>
				</td>
			</tr>
            <tr>
              <td>
					学位：<asp:TextBox ID="txtBal" runat="server" CssClass="textInput" 
                        style="width:100px;"></asp:TextBox>
				</td>
                 <td>
					专业技术职务：<asp:DropDownList ID="ddlJszwzg" runat="server" Height="20px" Width="142px">
                            </asp:DropDownList>
				</td>
                 <td colspan="2">
					出生日期： <input class="in_sty" id="txtBirthDay1" type="text" runat="server" 
                                style="text-align:left;" onfocus="WdatePicker()"/>至 <input class="in_sty" id="txtBirthDay2" type="text" runat="server" 
                                style="text-align:left;" onfocus="WdatePicker()"/>
				</td>
            </tr>
		</table>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button  onclick="javascript:searchHandler();return false;">检索</button></div></div></li>
				<li style="display:none;"><a class="button" href="#" onclick="javascirpt:ddd();return false;"><span>高级检索</span></a></li>
			</ul>
		</div>
        <div style="display:none;">
                    <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                    <ContentTemplate>
                    <asp:HiddenField ID="hdMaskMemberId" runat="server" />
                      <asp:LinkButton ID="linkBtnSearch" runat="server" onclick="linkBtnSearch_Click" ></asp:LinkButton>      
                      <asp:LinkButton ID="linkBtnMaskSearch" runat="server" onclick="linkBtnMaskSearch_Click" ></asp:LinkButton> 
                        <asp:HiddenField ID="hidDeleString" runat="server" />  
                      <asp:LinkButton ID="linkBtnDeleSelect" runat="server" onclick="linkBtnDeleSelect_Click" ></asp:LinkButton> 
                    </ContentTemplate>
                    </asp:UpdatePanel>
         </div>
       </div>     
	</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li id="li_add" runat="server"><a class="add" href="javascript:void(0);" onclick="javascript:addDate();return false;"><span>添加:</span></a></li>
			<li id="li_del" runat="server"><a class="delete" href="javascript:void(0);" onclick="javascript:deleteSelect();return false;"><span>批量删除</span></a></li>
			<li class="line">line</li>
				<li><a class="icon" href="javascript:void(0);" onclick="javascript:DownLoadExcel();return false;"  title="确实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
<asp:UpdatePanel runat="server" ID="UpdatePanel3">
<ContentTemplate>
    <asp:HiddenField ID="hdSaveID" runat="server" /> <%--保存选择的类型id--%>   

	<table class="table" width="100%" layoutH="138" >
		<thead>
			<tr>
                <th><input id="allChk" title="全选" onclick="javascript:$(this).SelectAll('tableBody');" value="all" type="checkbox" name="allChk"/></th>
                <th>姓名</th>                   
                <th>性别</th>
                <th>出生日期</th>
                <th>专业技术职务</th>
                <th>学位</th>
                <th>系</th>
                <th>所</th>             
                <th>操作</th>
			</tr>
		</thead>
		<tbody id="tableBody">
        <asp:Repeater ID="replData" runat="server"  onitemdatabound="replData_ItemDataBound">
        <ItemTemplate>
			<tr target="UserID" rel="<%# Eval("EmployeeID") %>">
                <td><INPUT id="Checkbox1" type="checkbox" name="chkson" onclick="javascript:$(this).singleSelected('allChk');" runat="server" class="checkbox" value='<%# Eval("EmployeeID") %>'></td>
                <td><%# Eval("Name")%></td>                       
                <td><%# Eval("Sex").ToString().ToUpper() == "TRUE"?"男":"女"%></td>
                <td><%# Eval("BirthDay").ToString() == "" ? "" :DateTime.Parse(Eval("BirthDay").ToString()).ToString("yyyy-MM-dd")%></td>
                <td><%# Eval("JsName")%></td>
                <td><%# Eval("Bachelor")%></td>
                <td><%# Eval("XiName")%></td>
                <td><%# Eval("SuoName")%></td>              
                <td><asp:Label ID="lb_oper" runat="server"></asp:Label>
                </td>
			</tr>
        </ItemTemplate>
        </asp:Repeater>
		</tbody>
	</table>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CustomInfoHTML="<div class='content'>第%CurrentPageIndex%/共%PageCount%页/共%RecordCount%条</div>"
                    FirstPageText="首页" LastPageText="末页" NextPageText="下页"
                    PrevPageText="上页" ShowCustomInfoSection="right" 
        ShowPageIndexBox="Never"  PageSize="10" Width="100%" CustomInfoClass="info"
        CssClass="paginator" onpagechanging="AspNetPager1_PageChanging" >
    </webdiyer:AspNetPager>
     </ContentTemplate>
                </asp:UpdatePanel>
                  <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
       <asp:LinkButton ID="lnkDownload" runat="server" onclick="lnkDownload_Click" ></asp:LinkButton>
    </ContentTemplate>
    <Triggers>
    <asp:PostBackTrigger ControlID="lnkDownload" />
    </Triggers>
    </asp:UpdatePanel>
    	
    </div>
   </form>
</body>
</html>
